package com.dolphin.apipassenger.remote;

import com.dolphin.apipassenger.request.OrderRequest;
import com.dolphin.common.dto.OrderInfo;
import com.dolphin.common.dto.ResponseResult;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

@FeignClient("service-order")
public interface ServiceOrderClient {

    @PostMapping("/order/add")
    ResponseResult add(@RequestBody OrderRequest orderRequest);
    @PostMapping("/order/book")
    ResponseResult book(OrderRequest orderRequest);

    @GetMapping("/test-real-time-order/{orderId}")
    String testDispatcherOrder(@PathVariable("orderId") long orderId);

    @PostMapping("/order/cancel")
    ResponseResult cancel(@RequestParam Long orderId, @RequestParam String identity);

    @GetMapping("/order/detail")
    ResponseResult<OrderInfo> detail(@RequestParam Long orderId);

    @GetMapping("/order/current")
    ResponseResult<OrderInfo> currentOrder(@RequestParam String phone , @RequestParam String identity);



}
